<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml" xmlns:shiro="http://www.w3.org/1999/xhtml">
<head>
    <head th:include="header :: header"></head>
    <title></title>
    <style>
        .form-horizontal{
            width: 85%;
        }
        .col-sm-4,.col-sm-3{
            padding-left: unset;
        }
        .col-sm-1{
            min-width: 150px;
        }
        .btn-label{
            padding: 3px 3px;
            font-size: 12px;
        }
        .myskin{
            background-color: transparent;/*背景透明*/
            box-shadow: 0 0 0 rgba(0,0,0,0);/*前景无阴影*/
            color: white;
        }
    </style>
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <div class="form-group col-sm-2">
                <select id="queryJobGroup" class="form-control" v-model="q.jobGroup" @change="changeJobGroup">
                    <option value="-1">--全部执行器--</option>
                    <option th:each="group:${JobGroupList}" th:value="${group.id}" th:text="${group.title}"></option>
                </select>
            </div>
            <div class="form-group col-sm-2">
                <select id="queryJobInfo" class="form-control" v-model="q.jobId" @change="query">
                    <option value="-1">--全部任务--</option>
                    <option v-for="option in JobInfoList" v-bind:value="option.id">{{option.name}}</option>
                </select>
            </div>
            <div class="form-group col-sm-2">
                <select class="form-control" v-model="q.logStatus" @change="query">
                    <option value="-1" selected>--任务状态--</option>
                    <option value="-1">全部</option>
                    <option value="1" >成功</option>
                    <option value="2" >失败</option>
                    <option value="3" >进行中</option>
                </select>
            </div>
            <a class="btn btn-default" @click="query">查询</a>

            <a shiro.hasPermission="sys:user:delete" class="btn btn-primary" @click="delShow"><i class="fa fa-trash-o"></i>&nbsp;清理</a>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>
</div>

<div class="modal fade" id="clearLogModal" tabindex="-1" role="dialog"  aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" >日志清理</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal form" role="form" >
                    <div class="form-group">
                        <label class="col-sm-3 control-label">执行器：</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control jobGroupText" readonly >
                            <input type="hidden" name="jobGroup" >
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-3 control-label">任务：</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control jobIdText" readonly >
                            <input type="hidden" name="jobId" >
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-3 control-label">清理方式：</label>
                        <div class="col-sm-9">
                            <select class="form-control" name="type" >
                                <option value="1" >清理一个月之前日志数据</option>
                                <option value="2" >清理三个月之前日志数据</option>
                                <option value="3" >清理六个月之前日志数据</option>
                                <option value="4" >清理一年之前日志数据</option>
                                <option value="5" >清理一千条以前日志数据</option>
                                <option value="6" >清理一万条以前日志数据</option>
                                <option value="7" >清理三万条以前日志数据</option>
                                <option value="8" >清理十万条以前日志数据</option>
                                <option value="9" >清理所有日志数据</option>
                            </select>
                        </div>
                    </div>

                    <hr>
                    <div class="form-group">
                        <div class="col-sm-offset-3 col-sm-6">
                            <button type="button" class="btn btn-primary ok" onclick="vm.del()">确定</button>
                            <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<script th:src="@{/statics/js/modules/xxljob/joblog.js}"></script>
</body>
</html>